/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lm.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Robson Motta
 */
@Embeddable
public class CtrlObjetoAcessoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_obj_autoriz")
    private int idObjAutoriz;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_modulo")
    private int idModulo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "num_seq_obj")
    private int numSeqObj;

    public CtrlObjetoAcessoPK() {
    }

    public CtrlObjetoAcessoPK(int idObjAutoriz, int idModulo, int numSeqObj) {
        this.idObjAutoriz = idObjAutoriz;
        this.idModulo = idModulo;
        this.numSeqObj = numSeqObj;
    }

    public int getIdObjAutoriz() {
        return idObjAutoriz;
    }

    public void setIdObjAutoriz(int idObjAutoriz) {
        this.idObjAutoriz = idObjAutoriz;
    }

    public int getIdModulo() {
        return idModulo;
    }

    public void setIdModulo(int idModulo) {
        this.idModulo = idModulo;
    }

    public int getNumSeqObj() {
        return numSeqObj;
    }

    public void setNumSeqObj(int numSeqObj) {
        this.numSeqObj = numSeqObj;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idObjAutoriz;
        hash += (int) idModulo;
        hash += (int) numSeqObj;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CtrlObjetoAcessoPK)) {
            return false;
        }
        CtrlObjetoAcessoPK other = (CtrlObjetoAcessoPK) object;
        if (this.idObjAutoriz != other.idObjAutoriz) {
            return false;
        }
        if (this.idModulo != other.idModulo) {
            return false;
        }
        if (this.numSeqObj != other.numSeqObj) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.lm.entity.CtrlObjetoAcessoPK[ idObjAutoriz=" + idObjAutoriz + ", idModulo=" + idModulo + ", numSeqObj=" + numSeqObj + " ]";
    }
    
}
